<?
    require_once("inc_security.php"); 
    $list = new fsDataGird($id_field, $name_field, translate_text("Listing"));
    $list->add('int_name','Tiêu đề','string',1,1);
    $list->add('',translate_text("Edit"),"edit");
    $list->add('',translate_text("Delete"),"delete");
    $list->ajaxedit($fs_table);
    $total			= new db_count("SELECT 	count(*) AS count 
											 FROM 	".$fs_table."
											 WHERE 1". $list->sqlSearch());

	$db_listing 	= new db_query("SELECT * 
									 FROM ".$fs_table."
									 WHERE 1".$list->sqlSearch()."
									 ORDER BY ".$list->sqlSort().' ' .$name_field ." ASC
									 " . $list->limit($total->total));
	$total_row		= mysql_num_rows($db_listing->result);
    //$companies = $db_listing->resultArray();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<?=$load_header;?>
<?=$list->headerScript();?>
</head>
<body style="margin: 0; padding: 0;">
<? /*---------Body------------*/ ?>
<div id="listing">
    <?= $list->showHeader($total_row);?>
    <?
        $i = 0;
        while($row = mysql_fetch_array($db_listing->result)){
            ++$i;
    ?>
    <?=$list->start_tr($i, $row[$id_field])?>
    <td>
        <input type="text" style="width:180px;" value="<?=$row['int_name']?>" name="<?='int_name'.$row[$id_field]?>" id="int_name_<?=$row[$id_field]?>" title="<?=$row['int_name']?>" class="form_control" onkeyup="check_edit('record_<?=$i?>')" />
    </td>
    <?=$list->showEdit($row[$id_field]); ?>
    <?=$list->showDelete($row[$id_field]); ?>
    <?=$list->end_tr();?>
    <?
        }
    ?>
    <?= $list->showFooter($total_row);?>
<? /*---------Body------------*/ ?>
</div>
</body>
</html>
